<?php
// +-------------------------------------------------------------------------------
// | DingZone [ A Rapid Development Framework For Dingtalk ]
// +-------------------------------------------------------------------------------
// | 钉钉纯文本消息 v1.0
// |
// | Copyright (c) 2014-2018 http://www.heimalanshi.com All rights reserved.
// | Author : Jie
// | Date : 2018-08-09
// +-------------------------------------------------------------------------------

namespace ding\msg\chat;

/**
 * 文本会话消息
 *
 * @package ding\msg\chat
 */
class TextChatMsg extends ChatMsg {
    protected $content;

    /**
     * 文本消息构造函数
     *
     * @param $content
     */
    public function __construct($content) {
        parent::__construct("text");
        $this->content = $content;
    }

    /**
     * 获取消息体
     * {
     *            "content": "我就是我, @156xxxx8827 是不一样的烟火"
     * }
     * @return array
     */
    public function getMsgContent() {
        return [
            'content' => $this->content
        ];
    }

}
